package com.suxin.queue.batch;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;

/**
 * @author Tang
 * @classname PendingParam
 * @description [  ]
 * @date 2022/2/16 20:42
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class PendingParam<T> {

    /**
     * 阻塞队列实现类
     */
    private BlockingQueue<T> queue;

    /**
     * batch 数量阈值
     */
    private Integer numThreshold;

    /**
     * batch 时间阈值
     */
    private Long timeThreshold;

    /**
     * 消费者线程实例
     */
    protected ExecutorService executorService;

}